1. Field of the Invention
The present invention relates generally to databases, and more particularly to a system and method for efficiently translating tuples retrieved from a relational database to object-oriented objects.
2. Related Art
An object-oriented computing environment typically includes an object-oriented database (or multiple object-oriented databases) for storing data according to an object-oriented database schema. The object-oriented database schema specifies the information needed to define the classes and the class hierarchy for the objects stored in the object-oriented database, such as the attributes for each class, the data type of each attribute, etc.
A great amount of data is currently stored in existing relational database management systems (RDBMS), such as DB2 produced by International Business Machines (IBM) Corporation, Oracle produced by Oracle Corp., and Sybase produced by Sybase Inc. Data is stored in a relational database according to a relational database schema, which specifies the tables in the relational database, the number of columns in each table, the nature of such columns, etc.
It would be beneficial if applications operating in object-oriented computing environments could access in an object-oriented manner data in relational database management systems. However, there are many problems that must be overcome before such object-oriented access to relational database management systems can be allowed. These problems stem from the fact that data is stored in a relational database according to a relational database schema, whereas data is stored in an object-oriented database according to an object-oriented database schema.
For example, a relational database management system typically returns tuples (i.e., rows of a table) when it is queried. An object-oriented application, however, does not expect to receive tuples when it makes an object-oriented database query. Instead, the object-oriented application expects to receive objects (or pointers to objects).
Thus, what is required is a system and method for enabling an object-oriented application to access data in a relational database management system in an object-oriented manner. In particular, what is required is a system and method for efficiently translating tuples retrieved from a relational database to object-oriented objects. The object-oriented objects are provided (either directly or via pointers) to the object-oriented application.